﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;
using EnvironmentManagerSystem.MODE;
using EnvironmentManagerSystem.BLL;
using System.Collections;

namespace EnvironmentManagerSystem
{
    public partial class XuanCeShi2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                form1.Target = "_blank";
               // form1.Target = "main";
                bind();
            }
        }
        public void bind()
        {
            rep.DataSource = EnvironmentManagerSystem.BLL.Expert.GetAll();
            rep.DataBind();
        }

        protected void s_Click(object sender, EventArgs e)
        {
            string name = "";
            foreach (RepeaterItem ri in rep.Items)
            {
                CheckBox cb = ri.FindControl("checkbox1") as CheckBox;
                if (cb.Checked)//这个是被选择的项
                {
                    if (name != "")
                    {
                        name += ";" + cb.Text;
                    }
                    else
                    {
                        name += cb.Text;
                    }
                }
            }
            Response.Redirect("XuanCeShi.aspx?name=" + name);

            //Response.Redirect("XuanCeShi.aspx?name=" + name);
        }
    }
}
